package com.springboot.springautowired.circularReference.construct;

import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;

/**
 * 构造器的方式会出现这种问题
 * @author mac
 * @date 2021/9/15 11:21 上午
 */
@Lazy//解决构造器循环依赖问题的方式
@Service
public class TestServiceI {
    private TestServiceII testServiceII;

    public TestServiceI(TestServiceII testServiceII) {
        this.testServiceII = testServiceII;
    }
}
